<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/15
 * Time: 10:39
 */
include_once 'common.php';
$is_login = getLoginStatus();
if (!$is_login){
    echo '您尚未登录，<a href="loginUi.php">去登录</a>';
    die;
}else{

    session_start();
    $token = $_COOKIE['Token'];
    //清除cookie
    setcookie('Token','',time()-3600,'/');

    //清除session
    unset($_SESSION[$token]);
    echo '退出成功!<a href="loginUi.php">请登入</a>';
}